CMAKE_MINIMUM_REQUIRED(VERSION 2.6)

SET(PROJECT_NAME vrpsolver)
PROJECT(${PROJECT_NAME})

FIND_PACKAGE(Qt4 REQUIRED)

FILE(GLOB SOURCES "src/*.cpp")
FILE(GLOB HEADERS "include/*.h")
FILE(GLOB FORMS "forms/*.ui")
FILE(GLOB RESOURCES "resources/res.qrc")
INCLUDE_DIRECTORIES("include")
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/QMapControl)
LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/QMapControl)

SET(CMAKE_BUILD_TYPE debug)
SET(CMAKE_CXX_FLAGS_DEBUG "-g")

QT4_WRAP_CPP(HEADERS_MOC ${HEADERS})
QT4_WRAP_UI(FORMS_HEADERS_MOC ${FORMS})
QT4_ADD_RESOURCES(RESOURCES_RCC ${RESOURCES})

SET(QT_USE_QTNETWORK TRUE)
SET(QT_USE_QTXML TRUE)
INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS})

SET(Boost_USE_SHARED_LIBS ON)
SET(BOOST_COMPONENTS graph)
FIND_PACKAGE(Boost COMPONENTS ${BOOST_COMPONENTS} REQUIRED)
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})


ADD_EXECUTABLE(${PROJECT_NAME} ${SOURCES} ${HEADERS} ${HEADERS_MOC} ${FORMS_HEADERS_MOC} ${RESOURCES_RCC})
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${QT_LIBRARIES} ${Boost_LIBRARIES} qmapcontrol)
